package org.apache.jsp.manager.bbs;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;

public final class BbsInfoUpdate_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=euc-kr");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      java.util.Hashtable outputTable = null;
      synchronized (request) {
        outputTable = (java.util.Hashtable) _jspx_page_context.getAttribute("outputTable", PageContext.REQUEST_SCOPE);
        if (outputTable == null){
          outputTable = new java.util.Hashtable();
          _jspx_page_context.setAttribute("outputTable", outputTable, PageContext.REQUEST_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      java.util.Hashtable inputTable = null;
      synchronized (request) {
        inputTable = (java.util.Hashtable) _jspx_page_context.getAttribute("inputTable", PageContext.REQUEST_SCOPE);
        if (inputTable == null){
          inputTable = new java.util.Hashtable();
          _jspx_page_context.setAttribute("inputTable", inputTable, PageContext.REQUEST_SCOPE);
        }
      }
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");

	ArrayList bbsInfoViewList = (ArrayList)outputTable.get("bbsInfoViewList");
	Hashtable bbsInfoTable = (Hashtable)bbsInfoViewList.get(0);

	String code = (String)bbsInfoTable.get("CODE");
	String useYn = (String)bbsInfoTable.get("USE_YN");
	String perPage = (String)bbsInfoTable.get("PER_PAGE");
	String searchYn = (String)bbsInfoTable.get("SEARCH_YN");
	String replyYn = (String)bbsInfoTable.get("REPLY_YN");
	String replySort = (String)bbsInfoTable.get("REPLY_SORT");
	String addYn = (String)bbsInfoTable.get("ADD_YN");
	String addSort = (String)bbsInfoTable.get("ADD_SORT");
	String updateYn = (String)bbsInfoTable.get("UPDATE_YN");
	String numberType = (String)bbsInfoTable.get("NUMBER_TYPE");
	String fileYn = (String)bbsInfoTable.get("FILE_YN");
	String regId = (String)bbsInfoTable.get("REG_ID");
	String regDate = (String)bbsInfoTable.get("REG_DATE");
	String regIp = (String)bbsInfoTable.get("REG_IP");
	String updId = (String)bbsInfoTable.get("UPD_ID");
	String updDate = (String)bbsInfoTable.get("UPD_DATE");
	String updIp = (String)bbsInfoTable.get("UPD_IP");

	String from = (String)inputTable.get("from");

      out.write("\r\n");
      out.write("\r\n");
      out.write("<SCRIPT language=\"JavaScript\">\r\n");
      out.write("\t// 게시판 목록 페이지 가기\r\n");
      out.write("\tfunction goList()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tdocument.location.href=\"/servlet/service.ManagerBbsServlet?func=managerBbs_001\";\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\t// 취소 버튼\r\n");
      out.write("\tfunction cancelAction()\r\n");
      out.write("\t{\r\n");

	if(from.equals("list"))
	{

      out.write("\r\n");
      out.write("\t\tdocument.location.href=\"/servlet/service.ManagerBbsServlet?func=managerBbs_001\";\r\n");

	}
	else if(from.equals("info"))
	{

      out.write("\r\n");
      out.write("\t\tdocument.location.href=\"/servlet/service.ManagerBbsServlet?func=managerBbs_002&code=");
      out.print( code);
      out.write("\";\r\n");

	}

      out.write("\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\t// 게시판 정보 수정\r\n");
      out.write("\tfunction updateAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.updateForm;\r\n");
      out.write("\t\tif(trim(f.name.value)==\"\")\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twindow.alert(\"게시판의 이름을 입력하세요.\");\r\n");
      out.write("\t\t\tf.name.select();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tf.name.value = trim(f.name.value);\r\n");
      out.write("\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("\r\n");
      out.write("<CENTER>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("\t\t<TR><TD height=\"25\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"1\" cellpadding=\"5\" bgcolor=\"#7682EB\" width=\"250\">\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD align=\"center\" bgcolor=\"#CFDDFA\" width=\"250\">\r\n");
      out.write("\t\t\t\t<FONT color=\"blue\" size=\"3\"><B>게시판 정보 수정</B></FONT>\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" width=\"600\">\r\n");
      out.write("\t\t<TR><TD height=\"20\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" width=\"600\">\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD align=\"right\">\r\n");
      out.write("\t\t\t\t<IMG src=\"/images/button/button_all_list.gif\" border=\"0\" onclick=\"goList();\" style=\"cursor:hand\" align=\"absmiddle\" onClick=\"goList();\">\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t\t<TR><TD height=\"3\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"1\" cellpadding=\"4\" bgcolor=\"#7682EB\" width=\"700\">\r\n");
      out.write("\t\t<FORM name=\"updateForm\" action=\"/servlet/service.ManagerBbsServlet\" method=\"post\" onSubmit=\"return false;\">\r\n");
      out.write("\t\t\t<INPUT type=\"hidden\" name=\"func\" value=\"managerBbs_006\">\r\n");
      out.write("\t\t\t<INPUT type=\"hidden\" name=\"from\" value=\"");
      out.print( from);
      out.write("\">\r\n");
      out.write("\t\t\t<INPUT type=\"hidden\" name=\"code\" value=\"");
      out.print( code);
      out.write("\">\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD width=\"150\" bgcolor=\"#CFDDFA\" align=\"center\"><B>게시판 이름</B></TD>\r\n");
      out.write("\t\t\t\t<TD width=\"550\" bgcolor=\"#FFFFFF\" colspan=\"3\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"text\" name=\"name\" size=\"78\" value=\"");
      out.print( bbsInfoTable.get("NAME"));
      out.write("\">\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD width=\"150\" bgcolor=\"#CFDDFA\" align=\"center\"><B>CODE</B></TD>\r\n");
      out.write("\t\t\t\t<TD width=\"120\" bgcolor=\"#FFFFFF\"><FONT color=\"#A2A2A2\">");
      out.print( code);
      out.write("</FONT></TD>\r\n");
      out.write("\t\t\t\t<TD width=\"130\" bgcolor=\"#CFDDFA\" align=\"center\"><B>사용 여부</B></TD>\r\n");
      out.write("\t\t\t\t<TD width=\"300\" bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"useYn\" value=\"Y\"");
if(useYn.equals("Y")){
      out.write(" checked");
}
      out.write(">사용&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"useYn\" value=\"N\"");
if(useYn.equals("N")){
      out.write(" checked");
}
      out.write(">미사용\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>출력 개수</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<SELECT name=\"perPage\">\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"5\"");
if(perPage.equals("5")){
      out.write(" selected");
}
      out.write(">5</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"10\"");
if(perPage.equals("10")){
      out.write(" selected");
}
      out.write(">10</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"15\"");
if(perPage.equals("15")){
      out.write(" selected");
}
      out.write(">15</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"20\"");
if(perPage.equals("20")){
      out.write(" selected");
}
      out.write(">20</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"25\"");
if(perPage.equals("25")){
      out.write(" selected");
}
      out.write(">25</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"30\"");
if(perPage.equals("30")){
      out.write(" selected");
}
      out.write(">30</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"50\"");
if(perPage.equals("50")){
      out.write(" selected");
}
      out.write(">50</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"75\"");
if(perPage.equals("75")){
      out.write(" selected");
}
      out.write(">75</OPTION>\r\n");
      out.write("\t\t\t\t\t\t<OPTION value=\"100\"");
if(perPage.equals("100")){
      out.write(" selected");
}
      out.write(">100</OPTION>\r\n");
      out.write("\t\t\t\t\t</SELECT> 개씩 출력\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>쓰기 권한</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"updateYn\" value=\"Y\"");
if(updateYn.equals("Y")){
      out.write(" checked");
}
      out.write(">글 작성 및 수정 가능&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"updateYn\" value=\"N\"");
if(updateYn.equals("N")){
      out.write(" checked");
}
      out.write(">글 보기만 가능\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>검색 기능</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"searchYn\" value=\"Y\"");
if(searchYn.equals("Y")){
      out.write(" checked");
}
      out.write(">사용&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"searchYn\" value=\"N\"");
if(searchYn.equals("N")){
      out.write(" checked");
}
      out.write(">미사용\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>Page Number Type</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"numberType\" value=\"T\"");
if(numberType.equals("T")){
      out.write(" checked");
}
      out.write(">10페이지 단위표시&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"numberType\" value=\"C\"");
if(numberType.equals("C")){
      out.write(" checked");
}
      out.write(">현재 페이지 가운데 표시\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>답글 기능</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"replyYn\" value=\"Y\"");
if(replyYn.equals("Y")){
      out.write(" checked");
}
      out.write(">사용&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"replyYn\" value=\"N\"");
if(replyYn.equals("N")){
      out.write(" checked");
}
      out.write(">미사용\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>답글 정렬</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"replySort\" value=\"DEPTH\"");
if(replySort.equals("DEPTH")){
      out.write(" checked");
}
      out.write(">최근글 우선 정렬&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"replySort\" value=\"STEP\"");
if(replySort.equals("STEP")){
      out.write(" checked");
}
      out.write(">작성 순서로 정렬\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>댓글 기능</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"addYn\" value=\"Y\"");
if(addYn.equals("Y")){
      out.write(" checked");
}
      out.write(">사용&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"addYn\" value=\"N\"");
if(addYn.equals("N")){
      out.write(" checked");
}
      out.write(">미사용\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>댓글 정렬</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"addSort\" value=\"DESC\"");
if(addSort.equals("ASC")){
      out.write(" checked");
}
      out.write(">최근글 우선 정렬&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"addSort\" value=\"ASC\"");
if(addSort.equals("DESC")){
      out.write(" checked");
}
      out.write(">작성 순서로 정렬\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>첨부 파일 기능</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"fileYn\" value=\"Y\"");
if(fileYn.equals("Y")){
      out.write(" checked");
}
      out.write(">사용&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t\t<INPUT type=\"radio\" name=\"fileYn\" value=\"N\"");
if(fileYn.equals("N")){
      out.write(" checked");
}
      out.write(">미사용\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B></B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">\r\n");
      out.write("\t\t\t\t</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>작성자 (IP)</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">");
      out.print( regId);
      out.write(' ');
      out.write('(');
      out.print( regIp);
      out.write(")</TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>작성일시</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">");
      out.print( regDate);
      out.write("</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t\t<TR>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>최종 수정자 (IP)</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">");
      out.print( updId);
      out.write(' ');
      out.write('(');
      out.print( updIp);
      out.write(")</TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#CFDDFA\" align=\"center\"><B>최종 수정일시</B></TD>\r\n");
      out.write("\t\t\t\t<TD bgcolor=\"#FFFFFF\">");
      out.print( updDate);
      out.write("</TD>\r\n");
      out.write("\t\t\t</TR>\r\n");
      out.write("\t\t</FORM>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" width=\"700\">\r\n");
      out.write("\t\t<TR><TD height=\"10\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" width=\"700\">\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD align=\"center\">\r\n");
      out.write("\t\t\t\t<IMG src=\"/images/button/but_update.gif\" border=\"0\" align=\"absmiddle\" alt=\"수정\" style=\"cursor:hand\" onClick=\"updateAction();\">\r\n");
      out.write("\t\t\t\t&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t<IMG src=\"/images/button/but_cancel1.gif\" border=\"0\" align=\"absmiddle\" alt=\"취소\" style=\"cursor:hand\" onClick=\"cancelAction();\">\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("\t<TABLE cellspacing=\"0\" cellpadding=\"0\" width=\"700\">\r\n");
      out.write("\t\t<TR><TD height=\"20\"></TD></TR>\r\n");
      out.write("\t</TABLE>\r\n");
      out.write("</CENTER>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
